﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterpage/QuanLy.Master" AutoEventWireup="true"
    CodeBehind="TinhLuong.aspx.cs" Inherits="DT5_Anh09110006_Hung09110044_Vu09110157.QuanLy.TinhLuong" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Bảng Lương</title>
    <script type="text/javascript">
        function printDiv(divName) {
            var printContents = document.getElementById(divName).innerHTML;
            var originalContents = document.body.innerHTML;

            document.body.innerHTML = printContents;

            window.print();

            document.body.innerHTML = originalContents;
        }
    </script>
    <style type="text/css">
        .lblLuongThang
        {
        	font-size:25px;
        	font-weight:bold;
        }
        #printableArea
        {
        	text-align:center;
        }
        .tblLuong
        {
        	margin-left:25%;
        }
        #NutInLuong
        {
        	margin-left:40%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="printableArea">
        <asp:Label ID="lblLuongThang" runat="server" CssClass="lblLuongThang"></asp:Label>
        <br />
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel runat="server">
            <ContentTemplate>
                <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CC9966"
                    BorderStyle="None" BorderWidth="1px" CellPadding="4" CssClass="tblLuong" 
                    AutoGenerateColumns="False">
                    <Columns>
                        <asp:BoundField HeaderText="Tên Nhân Viên" DataField="HoTenNV" />
                        <asp:BoundField HeaderText="Ngày Sinh" DataField="NgaySinh" DataFormatString="{0:dd/MM/yyyy}" />
                        <asp:BoundField HeaderText="Địa Chỉ" DataField="DiaChi" />
                        <asp:BoundField HeaderText="Lương" DataField="Luong" DataFormatString="{0}000 VNĐ"/>
                    </Columns>
                        <AlternatingRowStyle BackColor="White" />
                        <footerstyle backcolor="#FFFFCC" forecolor="#330099" />
                        <headerstyle backcolor="#990000" font-bold="True" forecolor="#FFFFCC" />
                        <pagerstyle backcolor="#FFFFCC" forecolor="#330099" horizontalalign="Center" />
                        <rowstyle backcolor="White" forecolor="#330099" />
                        <selectedrowstyle backcolor="#FFCC66" font-bold="True" forecolor="#663399" />
                        <sortedascendingcellstyle backcolor="#FEFCEB" />
                        <sortedascendingheaderstyle backcolor="#AF0101" />
                        <sorteddescendingcellstyle backcolor="#F6F0C0" />
                        <sorteddescendingheaderstyle backcolor="#7E0000" />
                </asp:GridView>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
    </div>
    <input type="button" value="In Danh Sách Lương" onclick="printDiv('printableArea')"
        class="btnIn" id="NutInLuong" />
</asp:Content>
